import request from '@/utils/request'

// 查询车辆信息列表
export function listEbike(query) {
  return request({
    url: '/vehicle/ebike/list',
    method: 'get',
    params: query
  })
}

// 查询车辆与违规详情
export function getDetails(ebikeId) {
  return request({
    url: '/vehicle/ebike/details/' + ebikeId,
    method: 'get'
  })
}



// 查询车辆信息详细
export function getEbike(ebikeId) {
  return request({
    url: '/vehicle/ebike/' + ebikeId,
    method: 'get'
  })
}

// 新增车辆信息
export function addEbike(data) {
  return request({
    url: '/vehicle/ebike',
    method: 'post',
    data: data
  })
}

// 修改车辆信息
export function updateEbike(data) {
  return request({
    url: '/vehicle/ebike',
    method: 'put',
    data: data
  })
}

// 删除车辆信息
export function delEbike(ebikeId) {
  return request({
    url: '/vehicle/ebike/' + ebikeId,
    method: 'delete'
  })
}


// 导出车辆二维码
export function exportQRCode(data) {
  return request({
    url: '/vehicle/ebike/exportQRCode',
    method: 'post',
    data: data,
    responseType: 'arraybuffer' // 设置响应类型为 arraybuffer
  });
}
